﻿CREATE TABLE [dbo].[AngajatiAdaosuri] (
    [IDAngajatAdaos]      INT             IDENTITY (1, 1) NOT NULL,
    [IDPersoana]          INT             NOT NULL,
    [IDAngajatSalarizare] INT             NOT NULL,
    [Suma]                DECIMAL (18, 2) CONSTRAINT [DF_AngajatiAdaosuri_Suma] DEFAULT ((0)) NOT NULL,
    [IDTipAdaos]          SMALLINT        NOT NULL,
    [Luna]                SMALLINT        CONSTRAINT [DF_AngajatiAdaosuri_Luna] DEFAULT ((1)) NOT NULL,
    [Anul]                SMALLINT        CONSTRAINT [DF_AngajatiAdaosuri_Anul] DEFAULT ((2010)) NOT NULL,
    CONSTRAINT [PK_AngajatiAdaosuri] PRIMARY KEY CLUSTERED ([IDAngajatAdaos] ASC),
    CONSTRAINT [FK_AngajatiAdaosuri_AngajatiSalarizare] FOREIGN KEY ([IDAngajatSalarizare]) REFERENCES [dbo].[AngajatiSalarizare] ([IDAngajatSalarizare]),
    CONSTRAINT [FK_AngajatiAdaosuri_Persoane] FOREIGN KEY ([IDPersoana]) REFERENCES [dbo].[Persoane] ([IdPersoana]),
    CONSTRAINT [FK_AngajatiAdaosuri_TipAdaos] FOREIGN KEY ([IDTipAdaos]) REFERENCES [dbo].[TipAdaos] ([IdTipAdaos])
);

